<template>
  <router-layout>
    <div class="container">
      <div class="content-box">
        <div class="head-box">
          <div class="img-box">
            <!-- <img :src="info.portrait" width="100%" height="100%" alt=""> -->
            <img v-bind:src="info.portrait" width="100%" height="100%" alt>
          </div>
          <p>{{info.user_name || '测试名字'}}</p>
        </div>
        <div class="form-box">
          <van-cell-group>
            <van-cell title="我参与的活动" @click="onClick(1)">
              <img
                class="img-icon"
                slot="icon"
                src="https://gw.alicdn.com/tfs/TB1ekdmOhTpK1RjSZFKXXa2wXXa-42-42.png"
              >
              <i slot="right-icon" class="iconfont icon-gengduo"></i>
            </van-cell>
            <van-cell title="我的奖品" @click="onClick(2)">
              <img
                class="img-icon"
                slot="icon"
                src="https://gw.alicdn.com/tfs/TB1ILBxOhjaK1RjSZFAXXbdLFXa-38-34.png"
              >
              <i slot="right-icon" class="iconfont icon-gengduo"></i>
            </van-cell>
          </van-cell-group>
        </div>
      </div>
    </div>
  </router-layout>
</template>

<script>
import TitleItem from "../../components/public/title/title";
export default {
  name: "LotteryMe",
  components: { TitleItem },
  data() {
    return {
      value: "",
      info: {}
    };
  },
  methods: {
    onClick(e) {
      if (e == 2) {
        this.$router.push({
          path: "/MyPrize",
          query: {
            id: e
          }
        });
      }
      if (e == 1) {
        this.$router.push({
          path: "/MyParticipant",
          query: {
            id: e
          }
        });
      }
    }
  },
  created() {},
  mounted() {
    this.info = JSON.parse(localStorage.getItem("user"));
  }
};
</script>

<style lang="scss" scoped>
@import "LotteryMe";
</style>

